#include "arrayQueue.h"
#include "linkQueue.h"

// 顺序队列的测试
void test01() {
    ArrayQueue *queue = createArrayQueue();
    for (int i = 0; i < 5; ++i) {
        enArrayQueue(queue, i + 100);
    }
    printf("=============\n");
    Element e;
    while (deArrayQueue(queue, &e) == 0) {
        printf("%d\t", e);
    }
    printf("\n");
    releaseArrayQueue(queue);
}

void test02() {
    LinkQueue *queue = createLinkQueue();
    for (int i = 0; i < 5; ++i) {
        enLinkQueue(queue, i + 100);
    }
    printf("=============\n");
    Element e;
    while (deLinkQueue(queue, &e) == 0) {
        printf("%d\t", e);
    }
    printf("\n");
    releaseLinkQueue(queue);
}

int main() {
    test01();
    return 0;
}